const app = getApp()
const utils = app.globalData.utils


export const loginService = (params) => utils.request({url: '/app/login/login', data: params, method: 'POST'})

export const addOrderService = (params) => {
	return utils.request({
		url: '/app/order/add',
		data: params,
		method: 'POST'
	})
}

export const listOrderService = (id) => {
	return utils.request({
		url: '/app/order/list/' + id
	})
}

export const listOrderByStatusService = (id, status) => {
	return utils.request({
		url: `/app/order/list/${id}/${status}`
	})
}

export const updateOrderService = (params) => {
	return utils.request({
		url: '/app/order',
		data: params,
		method: 'PUT'
	})
}